package com.neusoft.elmboot.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

import com.neusoft.elmboot.bean.RoleAdmin;


/**
 * 
 * @author chens 
 *
 */
@Repository
public interface RoleAdminMapper extends BaseMapper<RoleAdmin> {

	/**
	 * 桥表数据
	 * 
	 * @param object
	 * @return
	 */
	@Insert("insert into roleadmin(roleId,adminId) values(#{roleId},#{adminId})")
	public boolean add(RoleAdmin object);

	/**
	 * 删除某个用户的角色
	 * 
	 * @param adminId
	 * @return 
	 */
	@Delete("delete from roleadmin where adminId=#{adminId}")
	public boolean deleteByAdmin(int adminId);
}
